package com.grass.p019lv.novel.adapter;

import android.graphics.Color;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import com.androidsa.bttsddka.R;
import com.androidx.p013lv.base.bean.novel.SearchNovelHotRecommendBean;
import com.androidx.p013lv.base.recycler.BaseRecyclerAdapter;
import com.androidx.p013lv.base.recycler.BaseRecyclerHolder;

/* renamed from: com.grass.lv.novel.adapter.AudioFictionTwoViewAdapter */
public class AudioFictionTwoViewAdapter extends BaseRecyclerAdapter<SearchNovelHotRecommendBean.SearchNovelHotRecommendData, Holder> {
    String domain;

    public void setDomain(String str) {
        this.domain = str;
    }

    public void MyHolder(Holder holder, int i) {
        holder.setData((SearchNovelHotRecommendBean.SearchNovelHotRecommendData) this.list.get(i), i);
    }

    public void onViewRecycled(Holder holder) {
        super.onViewRecycled((RecyclerView.ViewHolder) holder);
    }

    @Override // androidx.recyclerview.widget.RecyclerView.Adapter
    public Holder onCreateViewHolder(ViewGroup viewGroup, int i) {
        return new Holder(LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.item_audio_fiction_two_view, viewGroup, false));
    }

    /* access modifiers changed from: package-private */
    /* renamed from: com.grass.lv.novel.adapter.AudioFictionTwoViewAdapter$Holder */
    public class Holder extends BaseRecyclerHolder {
        TextView tv_title;
        TextView tv_top_tag;

        public Holder(View view) {
            super(view);
            this.tv_top_tag = (TextView) view.findViewById(R.id.tv_top_tag);
            this.tv_title = (TextView) view.findViewById(R.id.tv_title);
        }

        public void setData(SearchNovelHotRecommendBean.SearchNovelHotRecommendData searchNovelHotRecommendData, int i) {
            this.tv_title.setText(searchNovelHotRecommendData.getFictionTitle());
            int i2 = i + 1;
            if (i2 == 1) {
                TextView textView = this.tv_top_tag;
                textView.setText(i2 + "");
                this.tv_title.setTextColor(Color.parseColor("#FF4242"));
                this.tv_top_tag.setBackgroundResource(R.drawable.shape_label_bg_top1);
            } else if (i2 == 2) {
                TextView textView2 = this.tv_top_tag;
                textView2.setText(i2 + "");
                this.tv_title.setTextColor(Color.parseColor("#FF6B62"));
                this.tv_top_tag.setBackgroundResource(R.drawable.shape_label_bg_top2);
            } else if (i2 == 3) {
                TextView textView3 = this.tv_top_tag;
                textView3.setText(i2 + "");
                this.tv_title.setTextColor(Color.parseColor("#FF8D00"));
                this.tv_top_tag.setBackgroundResource(R.drawable.shape_label_bg_top3);
            } else {
                TextView textView4 = this.tv_top_tag;
                textView4.setText(i2 + "");
            }
        }
    }
}
